package com.stud.system.service;

import com.stud.common.enums.WorkflowDefinitionEnum;
import com.stud.common.mybatis.BaseService;
import com.stud.system.domain.Workflow;
import com.stud.system.dto.WorkflowAuthDTO;
import com.stud.system.request.workflow.WorkflowApproveRequest;
import com.stud.system.request.workflow.WorkflowAuthRequest;
import com.stud.system.request.workflow.WorkflowRejectRequest;

/**
 * 流程实例Service接口
 *
 * @author Stud
 * @date 2023-03-06
 */
public interface WorkflowService extends BaseService<Workflow> {
    WorkflowAuthDTO workflowAuth(WorkflowAuthRequest request);

    /**
     * @param businessId             业务主键
     * @param workflowDefinitionEnum 业务编码枚举
     * @return
     */
    Long start(Long businessId, WorkflowDefinitionEnum workflowDefinitionEnum);

    Long approve(WorkflowApproveRequest request);

    Long reject(WorkflowRejectRequest request);

    Long reset(Long workflowId);
}
